/**
 * Copyright (C), 2018-2018, 河北东软有限公司
 * FileName: StudentService
 * Author:   Administrator
 * Date:     2018/4/24 13:56
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package pers.fqq.dlfd.student.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pers.fqq.dlfd.student.entity.StudentEntity;
import pers.fqq.dlfd.student.resposity.StudentRepo;

import java.util.List;

/**
 * 〈一句话功能简述〉<br>
 * 〈〉
 *
 * @author Administrator
 * @create 2018/4/24
 * @since 1.0.0
 */
@Service
public class StudentService {


    @Autowired
    StudentRepo studentRepo;

    public StudentEntity findStudent(String id, String name) {
        return studentRepo.findByIdAndName(id, name);
    }

    public List<StudentEntity> findAll() {
        return studentRepo.findAll();
    }

    public StudentEntity findOne(String id) {
        return studentRepo.getOne(id);
    }

    public StudentEntity save(StudentEntity entity) {
        return studentRepo.save(entity);
    }
}